package com.boot.web;

import com.boot.utils.CASUtil;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletRequest;

/**
 * @author Chunsheng.Zhang
 * @date 2021/1/12 16:48
 * @description : TODO
 */
@RestController
public class TestController {



    @RequestMapping("/index")
    public String index(){
        return "index";
    }



    @RequestMapping("/hello")
    public String hello(HttpServletRequest request){
        String currentUser = CASUtil.getAccountNameFromCas(request);
        return currentUser;
    }


    @RequestMapping("/logout/success")
    public String logout(){
        return "/logout/success";
    }

}
